import SpinningType from '@/platform/types/spinning-type';
import { Spin } from 'antd';
import React from 'react';
import PropTypes from 'prop-types';
import classes from './Spinning.module.less';

const Spinning:React.FC<SpinningType> = (props:SpinningType) => (
    <div
        className={classes["app-spinning"]}
        style={{
            display: props.visible ? 'block' : 'none'
        }}
    >
        <div className={classes["app-spinning-backdrop"]} />
        <div className={classes["app-spinning-container"]}>
            <Spin tip="加载中" size="large" />
        </div>
    </div>
);

Spinning.propTypes = {
    visible: PropTypes.bool.isRequired
}


export default Spinning;
